#!/usr/bin/env ruby
# Job yaml can send below ENVIRONMENT VARIABLES to me
# - pipeline_id
# END ENVIRONMENT VARIABLES

# eulermaker-build-image

require 'json'
require "#{ENV['LKP_SRC']}/lib/init_ccb.rb"
clone_ccb

require "#{ENV['LKP_SRC']}/lib/eulermaker_build.rb"

def main
  write_cli_config
  task_id = start_build_image
  loop_wait_build_image_finished(task_id)
end

main
